<template>
  <div>
    <div class="top">
      <img
        src="http://liufusong.top:8080/img/profile/bg.png"
        alt=""
        class="pic"
      />
      <div class="son">
        <div class="Headportrait">
          <img src="http://liufusong.top:8080/img/profile/avatar.png" alt="" />
          <div class="my-name">游客</div>
          <div class="login" @click="goto">去登陆</div>
        </div>
      </div>
    </div>
    <van-grid :column-num="3">
      <van-grid-item icon="star-o" text="我的收藏" />
      <van-grid-item icon="wap-home-o" text="我的出租" />
      <van-grid-item icon="clock-o" text="看房记录" />
      <van-grid-item icon="credit-pay" text="成为房主" />
      <van-grid-item icon="manager-o" text="个人资料" />
      <van-grid-item icon="service-o" text="联系我们" />
    </van-grid>
    <div class="pict">
      <img src="http://liufusong.top:8080/img/profile/join.png" alt="" />
    </div>
  </div>
</template>

<script>
export default {
  name: "user-page",
  data() {
    return {};
  },
  async created() {},
  methods: {
    goto() {
      this.$router.push("/login");
    },
  },
};
</script>

<style lang="less" scoped>
.top {
  // background-color: #087;
  position: relative;
  height: 300px;
  width: 100%;
  .pic {
    width: 100%;
  }
  .son {
    position: absolute;
    background: #fff;
    width: 85%;
    height: 55%;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    box-shadow: 0 0 10px 3px #ddd;
    .Headportrait {
      transform: translateY(-50%);
      left: 38%;
      position: absolute;
      width: 60px;
      height: 60px;
      border-radius: 50%;
      border: 5px solid #f5f5f5;
      img {
        width: 100%;
      }
      .my-name {
        margin-top: 30px;
        margin-bottom: 10px;
        text-align: center;
        font-size: 13px;
      }
      .login {
        background-color: #21b97a;
        color: #fff;
        text-align: center;
        font-size: 12px;
        line-height: 30px;
        height: 30px;
        width: 70px;
        border-radius: 5px;
        margin-top: 20px;
      }
    }
  }
}
.icon {
  width: 100%;
  height: 95px;
  // background-color: red;
  display: flex;
  flex-wrap: nowrap;
  .num {
    width: 125px;
    height: 100%;
    // background-color: #087;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
}
.pict {
  width: 100%;
  height: 84.88px;
  margin-top: 20px;
  margin-right: 15px;
  text-align: center;
  img {
    width: 345px;
  }
}
</style>
